<?php


class TestTask extends  \Phalcon\Cli\Task
{
    public $site= 'http://www.drinkt.org.cn';
   public function indexAction(){

       $aliyun = new Aliyun();
       $img_list = ImgInfo::find();
       foreach ($img_list as $vo){
           $res = $aliyun->upload(time()."_".$vo->id.".png",PUBLIC_PATH.$vo->img_path);
           $vo->oss_path = $res['info']['url'];
           $vo->save();
       }
   }
}